#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e5+9;
typedef long long ll;
struct point {
  ll x,y;
  double l2;
}P[maxn];
int n;
int main() {
  cin>>n;
  for(int i=0; i<n; ++i) {
    auto&[x,y,l] = P[i];
    cin>>x>>y;
    l = sqrt(x*x+y*y);
  }
  sort(P, P+n, [](point a, point b) {
    return a.x>b.x && a.y>b.y && a.l2>b.l2;
  });
  
}